import { Navigate, Outlet } from 'react-router-dom'
import { getCookies } from './utils/storage'

const PrivateRoute = () => {
  const isAuth = getCookies('session') || false
  return isAuth ? <Outlet /> : <Navigate to="/login" />
}

export default PrivateRoute
